Skip to content

fix(MessageSearch): add threadId attribute for thread messages#15858

Merged
Antreesy merged 3 commits intomainfrom
fix/noid/search-provider-thread
Sep 9, 2025
Merged

fix(MessageSearch): add threadId attribute for thread messages#15858
Antreesy merged 3 commits intomainfrom
fix/noid/search-provider-thread

Conversation

@Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Sep 8, 2025

β˜‘οΈ Resolves

  • Fix navigation to thread from search results (Unified Search, Talk sidebar)

πŸ–ŒοΈ UI Checklist

image

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • πŸ–ŒοΈ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • πŸ“— User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

πŸ› οΈ API Checklist

image

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible ⚠️
  • πŸ“˜ API documentation in docs/ has been updated or is not required
  • πŸ”– Capability is added or not needed

@Antreesy Antreesy added this to the 🍏 Next Major (33) milestone Sep 8, 2025
@Antreesy Antreesy self-assigned this Sep 8, 2025
@Antreesy
Copy link
Contributor Author

Antreesy commented Sep 8, 2025

@miaulalala should we extend some existing integration tests?

@miaulalala
Copy link
Contributor

@miaulalala should we extend some existing integration tests?

not a bad idea. Want me to take a look?

@Antreesy
Copy link
Contributor Author

Antreesy commented Sep 8, 2025

yesplease) feel free to push here

@miaulalala miaulalala force-pushed the fix/noid/search-provider-thread branch 2 times, most recently from 8ab5bc9 to 67d8ca6 Compare September 8, 2025 18:25
Antreesy and others added 3 commits September 8, 2025 21:22
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the fix/noid/search-provider-thread branch from cef3037 to 0d566d8 Compare September 8, 2025 19:22
@Antreesy Antreesy marked this pull request as ready for review September 9, 2025 09:12
@Antreesy
Copy link
Contributor Author

Antreesy commented Sep 9, 2025

Thanks @miaulalala, that should work correctly with replies now. Cursor is 5-10 entries here, so should be fine with extra query for thread added

@Antreesy
Copy link
Contributor Author

Antreesy commented Sep 9, 2025

/backport to stable32

@Antreesy Antreesy merged commit 2290ec5 into main Sep 9, 2025
84 checks passed
@Antreesy Antreesy deleted the fix/noid/search-provider-thread branch September 9, 2025 09:15
$messageStr,
$this->url->linkToRouteAbsolute('spreed.Page.showCall', ['token' => $room->getToken()]) . '#message_' . $comment->getId(),
$this->url->linkToRouteAbsolute('spreed.Page.showCall', ['token' => $room->getToken()])
. ($thread !== null ? '?threadId=' . $thread->getId() : '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not how we build URLs in PHP, but I will fix it in #15880 where the same thing was introduced for a second place


$threadId = (int)$comment->getTopmostParentId() ?: (int)$comment->getId();
try {
$thread = $this->threadService->findByThreadId($room->getId(), $threadId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does a query per search result.
Should be moved to a prepare step like we do in other places (same problem there is share loading)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: api πŸ› οΈ OCS API for conversations, chats and participants feature: frontend πŸ–ŒοΈ "Web UI" client feature: threads 🧡

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants